package rendava;

import java.awt.Color;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class GUI extends JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * The GUI for the browser.
	 * @author Ben Gomm
	 * @version 1.0
	 */
	public String chosenDocument;
	public Backend backend;
	public float zoomlevel;
	private JPanel canvas;
	private String filePath;
	private int zoom;
	
	
	public GUI()
	{
		chooseDocument("html");
		canvas = new JPanel();
		getContentPane().add(canvas = new JPanel());
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setSize(800, 600);
		canvas.setBackground(Color.WHITE);
		//setResizable(false);
		setVisible(true);
		backend = new Backend(filePath, canvas, this);
	
	}
	
	private void setZoom(int zoomLevel)
	{
		zoom = zoomLevel;
	}
	
	public void chooseDocument(String path)
	{
		filePath = path;
	}
	
	public static void main(String args[])
	{	
		new GUI();
	}
	
}